#!/usr/bin/env python3
# -*- coding: utf-8 -*-

""" 窗体 """

import tkinter as tk
import tkinter.ttk as ttk
import tkinter.messagebox


class Application(tk.Frame):

    def __init__(self, master=None):
        super().__init__(master)
        self.pack()
        self.initFrame()

    def initFrame(self):
        self.master.geometry('%dx%d' %(self.winfo_screenwidth(), self.winfo_screenheight()))
        self.createWidgets()

    def createWidgets(self):
        self.hi_there = tk.Button(self)
        self.hi_there['text'] = 'Hello Button'
        self.hi_there['command'] = self.say_hi
        self.hi_there.pack(side='top')
        self.quit = tk.Button(self,text='Quit',fg='red',command=self.master.destroy)
        self.quit.pack(side='bottom')

    def say_hi(self):
        print('hi there everyone!')


if __name__ == '__main__':
    app = Application()
    app.master.title('FaceDetector')
    app.master.maxsize(1000, 400)
    app.mainloop()
